<!DOCTYPE doctype PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">

<HTML>
  <HEAD>
    <META name="generator" content=
    "HTML Tidy for Java (vers. 2009-12-01), see jtidy.sourceforge.net">

    <TITLE>Debugger: Platform Selection</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <LINK rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">
  </HEAD>

  <BODY lang="EN-US">
    <H1><A name="plugin"></A>Debugger: Platform Selection</H1>

    <P>The Debugger allows the user to work with multiple platforms, i.e., architectures,
    compilers, etc., within the context of a single debug target. This plugin facilitates switching
    among platforms and introducing new platforms.</P>

    <P>Note we are currently supporting two trace database conventions. In the first, the system
    ascertains the target's platform and maps it to a Ghidra language and compiler spec at the time
    the trace is created. These are called the <EM>base</EM> language and base compiler spec.
    Together, they comprise the trace's <EM>host platform</EM>. This is used by "Recorder-mode"
    traces and most "TraceRmi-mode" traces.</P>

    <P>However, there are some cases where it is impractical to know the platform before creating
    the trace, e.g., when setting up "raw" connections. For these cases we have a second
    convention: The system creates a trace with the host platform
    <CODE>DATA:BE:64:default:pointer64</CODE>, for example. Thus, disassembly requires the system
    (or user) to ascertain the platform at a later time. This can then be mapped into the existing
    trace as a <EM>guest platform</EM>. Either convention permits guest platforms, but they are a
    necessary aspect of the second. If the system has failed to ascertain the platform, the user
    may attempt to do so by adding <EM>override</EM> platforms in trial-and-error fashion.
    Furthermore, even if the system has succeeded, there may be cause to try disassembly in
    alternative languages, e.g., Java bytecode when debugging its x86 JVM at the native level.</P>

    <H2>Actions</H2>

    <P>This plugin adds actions under the <B>Debugger &rarr; Choose Platform</B> menu.</P>

    <H3><A name="choose_host"></A>Host/base</H3>

    <P>This action corresponds to the current trace's host platform. Technically, this is just one
    platform option among possible recommendations, but it is always among them. If the host
    language is <B>DATA:...</B>, then this platform will not support disassembly. A guest platform
    is necessary.</P>

    <H3><A name="choose_platform"></A><I>[Platform Name]</I></H3>

    <P>This action is replicated for each recommended platform and for each platform already
    present in the trace. The recommendations are given by an opinion service, so new options may
    be added by Ghidra extension modules. It is possible there are no recommendations for the
    current trace. The current platform is indicated by a check mark.</P>

    <H3><A name="choose_more_platforms"></A><A name="prev_diff"></A>More...</H3>

    <P>This action is enabled whenever there is a current trace. It presents a dialog with the
    recommended platforms for the trace.</P>

    <DIV class="image">
      <IMG alt="" src="images/DebuggerSelectPlatformOfferDialog.png">
    </DIV>

    <P>The "Show Only Recommended Offers" check can be disabled to display <EM>override</EM>
    platforms as well. Every language-compiler-spec pair is offered as an override platform.
    Selecting an offer and confirming the dialog will add or change to the selected platform in the
    trace. Furthermore, the choice will be added to the <B>Choose Platform</B> menu for the current
    trace.</P>
  </BODY>
</HTML>
